public class JavaBean {
    // 姓名
    private String name;
    // 年龄
    private int age;
    // 性别
    private String gender;
    // 密码
    private int passWord;


    // 设置密码
    public void setPassWord (int passWord) {
        this.passWord = passWord;
    }
    // 获取密码
    public int getPassWord () {
        return passWord;
    }

    // 设置年龄
    public void setAge (int age) {
        this.age = age;
    }
    // 获取年龄
    public int setAge () {
        return age;
    }

    // 设置性别
    public void setGender (String gender) {
        this.gender = gender;
    }
    // 获取性别
    public String setGender () {
        return gender;
    }

    // 设置姓名
    public void setName (String name) {
        this.name = name;
    }
    // 获取姓名
    public String getName () {
        return name;
    }

    public JavaBean(){}

    // 构造方法
    public JavaBean(String name, int age, String gender, int passWord) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.passWord = passWord;
    }


    public static void main(String[] args) {
        // 创建JavaBean对象
        JavaBean bean = new JavaBean();
        // 设置属性
        bean.name = "张三";
        bean.age = 18;
        bean.passWord = 123456;
        bean.gender = "男";
        // 输出属性
        System.out.println("姓名：" + bean.name + "\t");
        System.out.println("年龄：" + bean.age + "\t");
        System.out.println("性别：" + bean.gender + "\t");
        System.out.println("密码：" + bean.passWord + "\t");
        System.out.println("--------------------");
        // 创建JavaBean对象
        JavaBean ja = new JavaBean("zhangsan",18, "男", 123456);
        // 输出属性
        System.out.println("姓名：" + bean.name + "\t");
        System.out.println("年龄：" + bean.age + "\t");
        System.out.println("性别：" + bean.gender + "\t");
        System.out.println("密码：" + bean.passWord + "\t");


    }
}

